<?php

require_once('ForumTopic.php');
require_once '/../Modele/BaseModel.php';
//require_once('/Modele/User.php');

/**
 * @access public
 * @author Joana
 * @package Mapping_Dead.Mod�le
 */
class ForumMessage extends BaseModel {

    /**
     * @AttributeType int
     */
    protected $idForumMessage;

    /**
     * @AttributeType int
     */
    protected $idTopic;

    /**
     * @AttributeType int
     */
    protected $idUser;

    /**
     * @AttributeType String
     */
    protected $message;

    /**
     * @AttributeType String
     */
    protected $dateCreation;

    public function __construct($id = null) {
        parent::__construct($id);
    }
    function getIdForumMessage() {
        return $this->idForumMessage;
    }

    function getIdTopic() {
        return $this->idTopic;
    }

    function getIdUser() {
        return $this->idUser;
    }

    function getMessage() {
        return $this->message;
    }

    function getDateCreation() {
        return $this->dateCreation;
    }

    function setIdForumMessage($idForumMessage) {
        $this->idForumMessage = $idForumMessage;
    }

    function setIdTopic($idTopic) {
        $this->idTopic = $idTopic;
    }

    function setIdUser($idUser) {
        $this->idUser = $idUser;
    }

    function setMessage($message) {
        $this->message = $message;
    }

    function setDateCreation($dateCreation) {
        $this->dateCreation = $dateCreation;
    }

        /**
     * @access public
     * @param String texte
     * @param String pieceJointe
     * @ParamType texte String
     * @ParamType pieceJointe String
     */
    public function Forum_message($texte, $pieceJointe) {
        // Not yet implemented
    }



    /**
     * @access public
     * @return String
     * @ReturnType String
     */
    public function getTexteMessage() {
        return $this->texteMessage;
    }

    /**
     * @access public
     * @param String texteMessage
     * @return void
     * @ParamType texteMessage String
     * @ReturnType void
     */
    public function setTexteMessage($texteMessage) {
        $this->texteMessage = $texteMessage;
    }

    /**
     * @access public
     * @return String
     * @ReturnType String
     */
    public function getPieceJointe() {
        return $this->pieceJointe;
    }

    /**
     * @access public
     * @param String pieceJointe
     * @return void
     * @ParamType pieceJointe String
     * @ReturnType void
     */
    public function setPieceJointe($pieceJointe) {
        $this->pieceJointe = $pieceJointe;
    }
    
    
    /**
     * @access public
     * @return Message[]
     * @ReturnType Message[]
     */
    public function getListeMessages($idTopic) {
         $args = array('idTopic'=>$idTopic);
        return $this->getElement($args);
    }
}

?>